#ifndef _ROUTES_H_
#define _ROUTES_H_

#include "vrAnimationNode.h"

class RouteParse{
public:
	RouteParse* next; // pointer to the next in the linked list

	DEFParse* from;
	DEFParse* to;

	VREventOutType eventFrom;
	VREventInType  eventTo;

	bool resolved;
	char field_from[256];
	char field_to[256];
	RouteParse(DEFParse* fromframe,DEFParse* toframe,char* fromfield,char* tofield);
	bool resolve();
	~RouteParse();

};

class RouteParseList{
public:
	RouteParse* head;

	RouteParseList();
	void add(RouteParse* what);
	void clean();
	~RouteParseList();
};

//extern RouteParseList global_route_list;

RouteParse* create_route(DEFFrameParse* def_frame,
						 char* node_from,char* field_from,
						 char* node_to,char* field_to);
//void rename_node(VRNode* n,int& def_idx);


extern VRGroup unusedNodes;
void init_unused_nodes();
void keep_unused_node(VRNode* node);
void delete_unused_nodes();

#endif